# -*- coding: utf-8 -*-
"""
# @Time    : 2021/1/12 下午3:42
# @Author  : tgy
# 继承
"""


class Person:
    ...
    name = '123'
    age = 22

    def __init__(self,name,age):
        self.name = name
        self.age = age


    # def __p1(self):
    #     ...

    def __f1(self):
        print('person f1')

    def f2(self):
        print('person f2')
        # self.f1()
        # super().f1()
        # __f1 被隐藏成了 _Person__f1,所以这里调用的是自己的方法
        self.__f1()

class Boy:
    ...
    opt = ''
    def __init__(self,opt):
        self.opt = opt

    def f1(self):
        print('boy f1')

class Student(Person, Boy):
    ...
    # def f2(self):
    #     ...
    #     print('student f1')

    def __f1(self):
        print('student f1')

    def __p1(self):
        ...



if __name__ == '__main__':
    ...
    print(Student.__bases__)
    student = Student('21', 30)
    print(student.age)
    student.f2()